#include <iostream>
#include <string.h>
using namespace std;

class student
{
public:
        void getscore()
        {
            // if(score<0 && score >100)
            // {
            //     cout << "分数不存在" << endl;
            //     return;
            // }
            cout << "分数:" << score << endl;
        }
        void addbonus(double bonus)
        {
            if(score + bonus <=100)
            {
                score += bonus;
                cout << "加分成功" << endl;
            }else
            {
                cout << "分数不能超过100分" << endl;
            }
        }

private:
        int id;
        double score;
};

int main()
{
    student stu;
    cout << "请输入一个分数"<< endl;
    double a;
    cin >> a;
    stu.addbonus(a);
    stu.getscore();

    return 0;

}